//是否全局需要mock
const needMock = false;

//mock 请求地址

export const mockUrl = 'http://localhost:3000';

//服务地址
const SeriverEnvEnum = {
  development: needMock ? mockUrl : 'http://192.168.198.197:9195/',
  production: ''
} as const;

// 获取当前环境变量
export const currentEnv = process.env.NODE_ENV as keyof typeof SeriverEnvEnum;

// 确保环境变量已设置
if (!currentEnv) {
  console.error('Environment variable NODE_ENV is not set.');
  throw new Error('NODE_ENV must be set');
}

export const baseUrl: string = SeriverEnvEnum[currentEnv];
